package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.dto.SetmealDto;
import com.itheima.reggie.entity.Setmeal;

/**
 * @Author: Bbz
 * @verson: 1.0
 * @Date: 2023/7/7 16:01
 */
public interface SetmealService extends IService<Setmeal> {

    //新增套餐，同时插入套餐对应的菜品数据，需要操作两张表：setmeal,setmeal_dish
    void saveWithDish(SetmealDto setmealDto);

    //查询套餐，将结果封装到SetmealDto
    SetmealDto getByIdWithDishs(Long id);

    //修改套餐，同时修改套餐对应的菜品数据，需要操作两张表：setmeal,setmeal_dish
    void updateWithDishs(SetmealDto setmealDto);

    //启用或者停用套餐
    void openOrClose(Integer status, Long id);

    //删除套餐
    void deleteWithDishs(Long id);
}
